package com.jbit.dm_160.controller;

import com.jbit.dm_160.model.entity.Area;
import com.jbit.dm_160.service.AreaService;
import com.jbit.dm_160.utils.ResponseEntity;
import com.jbit.dm_160.utils.ResponseUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/base/api")
public class BaseController {
    @Resource
    private AreaService areaService;
    @PostMapping("/p/area/queryCityList")
    public ResponseEntity<List<Area>> queryCityList(){
        return ResponseUtils.sendSuccess("0000",areaService.getAreas());
    }
}
